package com.yeung.alo

import java.util.Scanner

object Main {

  def main(args: Array[String]): Unit = {
    val scanner = new Scanner(System.in)
    val times = scanner.nextInt()
    val list = List.empty[(Int, Int)];
    for (x <- 0 to times - 1) {
      val a = scanner.nextInt()
      val b = scanner.nextInt()
      list.+:((a, b));
    }
    //使用动态规划法


  }

  def getCount(index: Int, list: List[(Int, Int)]): Int = {
    if (index == list.size) {
      val tuple = list(index)
      val sum = tuple._1 + tuple._2
      return sum;
    }else{
0
    }


  }

}
